home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch8g < prev    next >
Encoding:
Internet Message Format  |  1990-06-08  |  59.9 KB

  1. Path: uunet!ogicse!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v10i025:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch8g
  5. Message-ID: <5733@tekred.CNA.TEK.COM>
  6. Date: 5 Jun 90 17:53:22 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2346
  9. Approved: billr@saab.CNA.TEK.COM
  10. Posted: Tue Jun  5 10:53:22 1990
  11.  
  12. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  13. Posting-number: Volume 10, Issue 25
  14. Archive-name: NetHack3/Patch8g
  15. Patch-To: NetHack3: Volume 7, Issue 56-93
  16.  
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 7 (of 24)."
  26. # Contents:  patch8.06 vms/oldcrtl.c
  27. # Wrapped by billr@saab on Mon Jun  4 15:27:17 1990
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'patch8.06' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'patch8.06'\"
  31. else
  32. echo shar: Extracting \"'patch8.06'\" \(51445 characters\)
  33. sed "s/^X//" >'patch8.06' <<'END_OF_FILE'
  34. X*** src/Old/pager.c    Sun Jun  3 14:01:35 1990
  35. X--- src/pager.c    Thu May 31 22:11:29 1990
  36. X***************
  37. X*** 26,40 ****
  38. X  #define SEEK_SET 0
  39. X  #endif
  40. X  
  41. X  #ifndef OVLB
  42. X! OSTATIC char hc;
  43. X  #else /* OVLB */
  44. X! XSTATIC char hc = 0;
  45. X! #endif /* OVLB */
  46. X  
  47. X  static void FDECL(page_more, (FILE *,int));
  48. X! OSTATIC boolean FDECL(clear_help, (CHAR_P));
  49. X! OSTATIC boolean FDECL(valid_help, (CHAR_P));
  50. X  static boolean FDECL(pmatch,(const char *,const char *));
  51. X  static boolean FDECL(outspec,(const char *,int));
  52. X  static const char *FDECL(lookat,(int,int,UCHAR_P));
  53. X--- 26,41 ----
  54. X  #define SEEK_SET 0
  55. X  #endif
  56. X  
  57. X+ STATIC_DCL boolean FDECL(clear_help, (CHAR_P));
  58. X+ STATIC_DCL boolean FDECL(valid_help, (CHAR_P));
  59. X+ 
  60. X  #ifndef OVLB
  61. X! STATIC_DCL char hc;
  62. X  #else /* OVLB */
  63. X! STATIC_OVL char NEARDATA hc = 0;
  64. X  
  65. X  static void FDECL(page_more, (FILE *,int));
  66. X! static boolean FDECL(is_swallow_sym, (UCHAR_P));
  67. X  static boolean FDECL(pmatch,(const char *,const char *));
  68. X  static boolean FDECL(outspec,(const char *,int));
  69. X  static const char *FDECL(lookat,(int,int,UCHAR_P));
  70. X***************
  71. X*** 43,50 ****
  72. X  #endif
  73. X  static void NDECL(help_menu);
  74. X  
  75. X- #ifdef OVLB
  76. X- 
  77. X  /*
  78. X   * simple pattern matcher: '*' matches 0 or more characters
  79. X   * returns TRUE if strng matches patrn
  80. X--- 44,49 ----
  81. X***************
  82. X*** 74,79 ****
  83. X--- 73,89 ----
  84. X  }
  85. X  
  86. X  /*
  87. X+  * returns "true" for characters that could represent a monster's stomach
  88. X+  */
  89. X+ 
  90. X+ static boolean
  91. X+ is_swallow_sym(c)
  92. X+ uchar c;
  93. X+ {
  94. X+     return (index(" /-\\|", (char)c) != 0);
  95. X+ }
  96. X+ 
  97. X+ /*
  98. X   * print out another possibility for dowhatis. "new" is the possible new
  99. X   * string; "out_flag" indicates whether we really want output, and if
  100. X   * so what kind of output: 0 == no output, 1 == "(or %s)" output. 
  101. X***************
  102. X*** 85,91 ****
  103. X  const char *new;
  104. X  int out_flag;
  105. X  {
  106. X!     static char old[50];
  107. X  
  108. X      if (!strcmp(old, new))
  109. X          return FALSE;        /* don't print the same thing twice */
  110. X--- 95,101 ----
  111. X  const char *new;
  112. X  int out_flag;
  113. X  {
  114. X!     static char NEARDATA old[50];
  115. X  
  116. X      if (!strcmp(old, new))
  117. X          return FALSE;        /* don't print the same thing twice */
  118. X***************
  119. X*** 110,116 ****
  120. X      register struct monst *mtmp;
  121. X      register struct obj *otmp;
  122. X      struct trap *trap;
  123. X!     static char answer[50];
  124. X      register char *s, *t;
  125. X      uchar typ;
  126. X  
  127. X--- 120,126 ----
  128. X      register struct monst *mtmp;
  129. X      register struct obj *otmp;
  130. X      struct trap *trap;
  131. X!     static char NEARDATA answer[50];
  132. X      register char *s, *t;
  133. X      uchar typ;
  134. X  
  135. X***************
  136. X*** 133,138 ****
  137. X--- 143,150 ----
  138. X              u.mtimedone ? mons[u.umonnum].mname :
  139. X  #endif
  140. X              pl_character, plname);
  141. X+     } else if (u.uswallow && is_swallow_sym(ch)) {
  142. X+         Sprintf(answer, "interior of %s", defmonnam(u.ustuck));
  143. X      } else if (mtmp && !mtmp->mimic)
  144. X          Sprintf(answer, "%s%s",
  145. X             mtmp->mtame ? "tame " :
  146. X***************
  147. X*** 152,158 ****
  148. X              if (mtmp->mappearance == STRANGE_OBJECT)
  149. X                  Strcpy(answer, "strange object");
  150. X              else {
  151. X!                 otmp = mksobj((int) mtmp->mappearance,FALSE );
  152. X                  Strcpy(answer, distant_name(otmp, xname));
  153. X                  free((genericptr_t) otmp);
  154. X              }
  155. X--- 164,175 ----
  156. X              if (mtmp->mappearance == STRANGE_OBJECT)
  157. X                  Strcpy(answer, "strange object");
  158. X              else {
  159. X!                 int oindx = mtmp->mappearance;
  160. X!                 otmp = mksobj(oindx,FALSE );
  161. X!                 if(oindx == STATUE || oindx == FIGURINE)
  162. X!                     otmp->corpsenm = PM_KOBOLD;
  163. X!                 else if (oindx == DRAGON_SCALE_MAIL)
  164. X!                     otmp->corpsenm = PM_RED_DRAGON;
  165. X                  Strcpy(answer, distant_name(otmp, xname));
  166. X                  free((genericptr_t) otmp);
  167. X              }
  168. X***************
  169. X*** 263,268 ****
  170. X--- 280,286 ----
  171. X      boolean oldverb = flags.verbose;
  172. X      boolean found_in_file = FALSE, need_to_print = FALSE;
  173. X      int    found = 0;
  174. X+     static const char *mon_interior = "the interior of a monster";
  175. X  
  176. X  #ifdef OS2_CODEVIEW
  177. X      char tmp[PATHLEN];
  178. X***************
  179. X*** 321,329 ****
  180. X                  return 0;
  181. X          }
  182. X          flags.verbose = FALSE;
  183. X!         q = levl[cc.x][cc.y].scrsym;
  184. X!         if (!q || (!levl[cc.x][cc.y].seen && !MON_AT(cc.x,cc.y)))
  185. X!             q = ' ';
  186. X      }
  187. X  
  188. X      if (!q)
  189. X--- 339,365 ----
  190. X                  return 0;
  191. X          }
  192. X          flags.verbose = FALSE;
  193. X!         if (!u.uswallow) {
  194. X!             q = levl[cc.x][cc.y].scrsym;
  195. X!             if (!q || (!levl[cc.x][cc.y].seen && !MON_AT(cc.x,cc.y)))
  196. X!                 q = ' ';
  197. X!         }
  198. X!         else if (cc.x == u.ux && cc.y == u.uy)
  199. X!             q = u.usym;
  200. X!         else {
  201. X!             i = (u.uy - cc.y)+1;
  202. X!             if (i < 0 || i > 2)
  203. X!                 q = ' ';
  204. X!             else {
  205. X!                 firstmatch = (i == 0) ? "/-\\" :
  206. X!                     (i == 1) ? "| |" : "\\-/";
  207. X!                 i = (u.ux - cc.x)+1;
  208. X!                 if (i < 0 || i > 2)
  209. X!                     q = ' ';
  210. X!                 else
  211. X!                     q = firstmatch[i];
  212. X!             }
  213. X!         }
  214. X      }
  215. X  
  216. X      if (!q)
  217. X***************
  218. X*** 337,343 ****
  219. X  /*
  220. X   * if the user just typed one letter, or we're identifying from the
  221. X   * screen, then we have to check all the possibilities and print them
  222. X!  * out for him/her
  223. X   */
  224. X  
  225. X  /* Check for monsters */
  226. X--- 373,379 ----
  227. X  /*
  228. X   * if the user just typed one letter, or we're identifying from the
  229. X   * screen, then we have to check all the possibilities and print them
  230. X!  * out for him/her.
  231. X   */
  232. X  
  233. X  /* Check for monsters */
  234. X***************
  235. X*** 351,356 ****
  236. X--- 387,406 ----
  237. X          }
  238. X      }
  239. X  
  240. X+ /* Special case: if identifying from the screen, and
  241. X+  * we're swallowed, and looking at something other than our own symbol,
  242. X+  * then just say "the interior of a monster".
  243. X+  */
  244. X+     if (u.uswallow && is_swallow_sym(q)) {
  245. X+         if (!found) {
  246. X+             pline("%c       %s", q, mon_interior);
  247. X+             (void)outspec(firstmatch=mon_interior, 0);
  248. X+         }
  249. X+         else
  250. X+             (void)outspec(mon_interior, 1);
  251. X+         found++; need_to_print = TRUE;
  252. X+     }
  253. X+ 
  254. X  /* Now check for objects */
  255. X      for (i = 0; objsyms[i]; i++) {
  256. X          if (q == objsyms[i]) {
  257. X***************
  258. X*** 402,407 ****
  259. X--- 452,459 ----
  260. X  
  261. X  checkfile:
  262. X  
  263. X+     if (!strncmp(inp, "interior of ", 12))
  264. X+         inp += 12;
  265. X      if (!strncmp(inp, "a ", 2))
  266. X          inp += 2;
  267. X      else if (!strncmp(inp, "an ", 3))
  268. X***************
  269. X*** 415,434 ****
  270. X      if (!strncmp(inp, "invisible ", 10))
  271. X          inp += 10;
  272. X  
  273. X!     if ((!q || found) && *inp) {
  274. X  /* adjust the input to remove "named " and convert to lower case */
  275. X           for (ep = inp; *ep; ) {
  276. X              if ((!strncmp(ep, " named ", 7) && (alt = ep + 7)) ||
  277. X                  !strncmp(ep, " called ", 8))
  278. X                  *ep = 0;
  279. X!             else
  280. X!                 (*ep = tolower(*ep)), ep++;
  281. X          }
  282. X  
  283. X  /*
  284. X   * If the object is named, then the name is the alternate search string;
  285. X   * otherwise, the result of makesingular() applied to the name is. This
  286. X!  * isn't strictly optimal, but named objects of interest to the user should
  287. X   * will usually be found under their name, rather than under their
  288. X   * object type, so looking for a singular form is pointless.
  289. X   */
  290. X--- 467,495 ----
  291. X      if (!strncmp(inp, "invisible ", 10))
  292. X          inp += 10;
  293. X  
  294. X! /*
  295. X!  * look in the file for more info if:
  296. X!  * the user typed in the whole name (!q)
  297. X!  * OR we've found a possible match with the character q (found) and
  298. X!  *    flags.help is TRUE
  299. X!  * and, of course, the name to look for must be non-empty.
  300. X!  */
  301. X!     if ((!q || (found && flags.help)) && *inp) {
  302. X  /* adjust the input to remove "named " and convert to lower case */
  303. X           for (ep = inp; *ep; ) {
  304. X              if ((!strncmp(ep, " named ", 7) && (alt = ep + 7)) ||
  305. X                  !strncmp(ep, " called ", 8))
  306. X                  *ep = 0;
  307. X!             else {
  308. X!                 if(isupper(*ep)) *ep = tolower(*ep);
  309. X!                 ep++;
  310. X!             }
  311. X          }
  312. X  
  313. X  /*
  314. X   * If the object is named, then the name is the alternate search string;
  315. X   * otherwise, the result of makesingular() applied to the name is. This
  316. X!  * isn't strictly optimal, but named objects of interest to the user
  317. X   * will usually be found under their name, rather than under their
  318. X   * object type, so looking for a singular form is pointless.
  319. X   */
  320. X***************
  321. X*** 436,442 ****
  322. X          if (!alt)
  323. X              alt = makesingular(inp);
  324. X          else
  325. X!             for (ep = alt; *ep; ep++) *ep = tolower(*ep);
  326. X  
  327. X          while(fgets(buf,BUFSZ,fp)) {
  328. X              if(*buf != '\t') {
  329. X--- 497,504 ----
  330. X          if (!alt)
  331. X              alt = makesingular(inp);
  332. X          else
  333. X!             for (ep = alt; *ep; ep++) 
  334. X!                 if(isupper(*ep)) *ep = tolower(*ep);
  335. X  
  336. X          while(fgets(buf,BUFSZ,fp)) {
  337. X              if(*buf != '\t') {
  338. X***************
  339. X*** 555,561 ****
  340. X  }
  341. X  
  342. X  /* make the paging of a file interruptible */
  343. X! static int got_intrup;
  344. X  
  345. X  #if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
  346. X  static int
  347. X--- 617,623 ----
  348. X  }
  349. X  
  350. X  /* make the paging of a file interruptible */
  351. X! static volatile int NEARDATA got_intrup;
  352. X  
  353. X  #if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
  354. X  static int
  355. X***************
  356. X*** 572,584 ****
  357. X  FILE *fp;
  358. X  int strip;    /* nr of chars to be stripped from each line (0 or 1) */
  359. X  {
  360. X-     register char *bufr;
  361. X- #if !defined(MSDOS) && !defined(MINIMAL_TERM)
  362. X-     register char *ep;
  363. X- #endif
  364. X- #if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
  365. X-     int (*prevsig)() = (int (*)())signal(SIGINT, (SIG_RET_TYPE) intruph);
  366. X- #endif
  367. X  #ifdef MACOS
  368. X      short tmpflags;
  369. X      
  370. X--- 634,639 ----
  371. X***************
  372. X*** 590,595 ****
  373. X--- 645,657 ----
  374. X      }
  375. X      macflags |= (tmpflags & fDoUpdate);
  376. X  #else
  377. X+     register char *bufr;
  378. X+ #if !defined(MSDOS) && !defined(MINIMAL_TERM)
  379. X+     register char *ep;
  380. X+ #endif
  381. X+ #if !defined(MSDOS) && !defined(TOS)
  382. X+     int (*prevsig)() = (int (*)())signal(SIGINT, (SIG_RET_TYPE) intruph);
  383. X+ #endif
  384. X  #if defined(MSDOS) || defined(MINIMAL_TERM)
  385. X      /* There seems to be a bug in ANSI.SYS  The first tab character
  386. X       * after a clear screen sequence is not expanded correctly.  Thus
  387. X***************
  388. X*** 603,608 ****
  389. X--- 665,672 ----
  390. X      while (fgets(buf, BUFSIZ, fp) && (!strip || *buf == '\t')){
  391. X          bufp = buf;
  392. X          bufrp = bufr;
  393. X+         if (strip && *bufp && *bufp != '\n')
  394. X+             *bufrp++ = *bufp++;
  395. X          while (*bufp && *bufp != '\n') {
  396. X              if (*bufp == '\t') {
  397. X                  spaces = tabstop - (bufrp - bufr) % tabstop;
  398. X***************
  399. X*** 631,641 ****
  400. X  ret:
  401. X      free((genericptr_t) bufr);
  402. X      (void) fclose(fp);
  403. X! #if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
  404. X      (void) signal(SIGINT, (SIG_RET_TYPE) prevsig);
  405. X      got_intrup = 0;
  406. X  #endif
  407. X! #endif
  408. X  }
  409. X  
  410. X  #endif /* OVLB */
  411. X--- 695,705 ----
  412. X  ret:
  413. X      free((genericptr_t) bufr);
  414. X      (void) fclose(fp);
  415. X! #if !defined(MSDOS) && !defined(TOS)
  416. X      (void) signal(SIGINT, (SIG_RET_TYPE) prevsig);
  417. X      got_intrup = 0;
  418. X  #endif
  419. X! #endif /* MACOS */
  420. X  }
  421. X  
  422. X  #endif /* OVLB */
  423. X***************
  424. X*** 644,654 ****
  425. X  
  426. X  #ifndef OVLB
  427. X  
  428. X! OSTATIC boolean whole_screen;
  429. X  
  430. X  #else /* OVLB */
  431. X  
  432. X! XSTATIC boolean whole_screen = TRUE;
  433. X  
  434. X  void
  435. X  set_whole_screen() {    /* called in termcap as soon as LI is known */
  436. X--- 708,718 ----
  437. X  
  438. X  #ifndef OVLB
  439. X  
  440. X! STATIC_DCL boolean whole_screen;
  441. X  
  442. X  #else /* OVLB */
  443. X  
  444. X! STATIC_OVL boolean NEARDATA whole_screen = TRUE;
  445. X  
  446. X  void
  447. X  set_whole_screen() {    /* called in termcap as soon as LI is known */
  448. X***************
  449. X*** 674,680 ****
  450. X  #ifdef LINT    /* lint may handle static decl poorly -- static boolean so; */
  451. X      boolean so;
  452. X  #else
  453. X!     static boolean so;
  454. X  #endif
  455. X      if(mode == 0) {
  456. X          if(!whole_screen) {
  457. X--- 738,744 ----
  458. X  #ifdef LINT    /* lint may handle static decl poorly -- static boolean so; */
  459. X      boolean so;
  460. X  #else
  461. X!     static boolean NEARDATA so;
  462. X  #endif
  463. X      if(mode == 0) {
  464. X          if(!whole_screen) {
  465. X***************
  466. X*** 688,700 ****
  467. X          so = flags.standout;
  468. X          flags.standout = 1;
  469. X      } else {
  470. X- #ifdef MACOS
  471. X-         macflags |= fFullScrKluge;
  472. X- #endif
  473. X          if(mode == 1) {
  474. X- #ifdef MACOS
  475. X-             macflags |= fCornScrKluge;
  476. X- #endif
  477. X              curs(1, LI);
  478. X              more();
  479. X          }
  480. X--- 752,758 ----
  481. X***************
  482. X*** 705,713 ****
  483. X              curs(1, ROWNO+4);
  484. X              cl_eos();
  485. X          }
  486. X- #ifdef MACOS
  487. X-         macflags &= ~fScreenKluges;
  488. X- #endif
  489. X      }
  490. X  }
  491. X  
  492. X--- 763,768 ----
  493. X***************
  494. X*** 718,723 ****
  495. X--- 773,782 ----
  496. X  page_line(s)        /* returns 1 if we should quit */
  497. X  register const char *s;
  498. X  {
  499. X+ #ifdef CLIPPING
  500. X+ /* we assume here that no data files have more than 80 chars/line */
  501. X+     static char tmp[81], *t;
  502. X+ #endif
  503. X      if(cury == LI-1) {
  504. X          if(!*s)
  505. X              return(0);    /* suppress blank lines at top */
  506. X***************
  507. X*** 735,740 ****
  508. X--- 794,821 ----
  509. X              cl_eos();
  510. X          }
  511. X      }
  512. X+ #ifdef CLIPPING
  513. X+ /* if lines are too long for the screen, first try stripping leading blanks */
  514. X+     if (strlen(s) >= CO) {
  515. X+         while (*s == ' ' || *s == '\t') s++;
  516. X+     }
  517. X+ 
  518. X+ /* if it's still too long, try compressing blanks */
  519. X+     if (strlen(s) >= CO) {
  520. X+         t = tmp;
  521. X+         while ( (*t = *s) != 0) {
  522. X+             if (*t == ' ') {
  523. X+                 while (*s == ' ')
  524. X+                     s++;
  525. X+             }
  526. X+             else
  527. X+                 s++;
  528. X+             t++;
  529. X+         }
  530. X+         s = tmp;
  531. X+     }
  532. X+ #endif /* CLIPPING */
  533. X+ 
  534. X  #ifdef TERMINFO
  535. X      xputs(s); xputc('\n');
  536. X  #else
  537. X***************
  538. X*** 767,775 ****
  539. X      static struct line {
  540. X          struct line *next_line;
  541. X          char *line_text;
  542. X!     } *texthead, *texttail;
  543. X!     static int maxlen;
  544. X!     static int linect;
  545. X      register struct line *tl;
  546. X      register boolean hmenu = FALSE;
  547. X  
  548. X--- 848,856 ----
  549. X      static struct line {
  550. X          struct line *next_line;
  551. X          char *line_text;
  552. X!     } NEARDATA *texthead, NEARDATA *texttail;
  553. X!     static int NEARDATA maxlen;
  554. X!     static int NEARDATA linect;
  555. X      register struct line *tl;
  556. X      register boolean hmenu = FALSE;
  557. X  
  558. X***************
  559. X*** 817,833 ****
  560. X      else
  561. X      if(mode == 2) {
  562. X          register int curline, lth;
  563. X- #ifdef MACOS
  564. X-         short tmpflags;
  565. X-         extern struct line *mactexthead;
  566. X-         extern int macmaxlen, maclinect;
  567. X-         
  568. X-         tmpflags = macflags;
  569. X-         macflags |= fDoUpdate | fDisplayKluge;
  570. X-         mactexthead = texthead;
  571. X-         macmaxlen = maxlen;
  572. X-         maclinect = linect;
  573. X- #endif
  574. X  
  575. X          if(flags.toplin == 1) more();    /* ab@unido */
  576. X          remember_topl();
  577. X--- 898,903 ----
  578. X***************
  579. X*** 862,870 ****
  580. X  #endif
  581. X          cl_end ();
  582. X          if (!hmenu) {
  583. X- #ifdef MACOS
  584. X-             macflags |= fCornScrKluge;
  585. X- #endif
  586. X              cmore (text);
  587. X          }
  588. X          if (!hmenu || clear_help(hc)) {
  589. X--- 932,937 ----
  590. X***************
  591. X*** 872,886 ****
  592. X              cl_end ();
  593. X              docorner (lth, curline-1);
  594. X          }
  595. X  #ifdef MACOS
  596. X!             mactexthead = NULL;
  597. X!             macflags |= (tmpflags & (fDoUpdate | fDisplayKluge));
  598. X  #endif
  599. X-         } else {                    /* feed to pager */
  600. X          set_pager(0);
  601. X          for (tl = texthead; tl; tl = tl->next_line) {
  602. X              if (page_line (tl->line_text)) {
  603. X              set_pager(2);
  604. X              while(tl = texthead) {
  605. X                  texthead = tl->next_line;
  606. X                  free((genericptr_t) tl);
  607. X--- 939,958 ----
  608. X              cl_end ();
  609. X              docorner (lth, curline-1);
  610. X          }
  611. X+         } else {                    /* feed to pager */
  612. X  #ifdef MACOS
  613. X!         short    tmpflags;
  614. X!         
  615. X!         tmpflags = macflags;
  616. X!         macflags &= ~fDoNonKeyEvt;
  617. X  #endif
  618. X          set_pager(0);
  619. X          for (tl = texthead; tl; tl = tl->next_line) {
  620. X              if (page_line (tl->line_text)) {
  621. X              set_pager(2);
  622. X+ #ifdef MACOS
  623. X+             macflags = tmpflags;
  624. X+ #endif
  625. X              while(tl = texthead) {
  626. X                  texthead = tl->next_line;
  627. X                  free((genericptr_t) tl);
  628. X***************
  629. X*** 893,898 ****
  630. X--- 965,973 ----
  631. X              set_pager(2);
  632. X          } else
  633. X              set_pager(1);
  634. X+ #ifdef MACOS
  635. X+         macflags = tmpflags;
  636. X+ #endif
  637. X          }
  638. X      }
  639. X  
  640. X***************
  641. X*** 966,972 ****
  642. X      cornline(-1,"");
  643. X  }
  644. X  
  645. X! XSTATIC boolean
  646. X  clear_help(c)
  647. X  char c;
  648. X  {
  649. X--- 1041,1047 ----
  650. X      cornline(-1,"");
  651. X  }
  652. X  
  653. X! STATIC_OVL boolean
  654. X  clear_help(c)
  655. X  char c;
  656. X  {
  657. X***************
  658. X*** 1004,1010 ****
  659. X          );
  660. X  }
  661. X  
  662. X! XSTATIC boolean
  663. X  valid_help(c)
  664. X  char c;
  665. X  {
  666. X--- 1079,1085 ----
  667. X          );
  668. X  }
  669. X  
  670. X! STATIC_OVL boolean
  671. X  valid_help(c)
  672. X  char c;
  673. X  {
  674. X*** src/Old/pickup.c    Sun Jun  3 14:02:35 1990
  675. X--- src/pickup.c    Sun May 27 17:58:15 1990
  676. X***************
  677. X*** 7,26 ****
  678. X   */
  679. X  
  680. X  #include    "hack.h"
  681. X! #ifndef OVERLAY
  682. X! static int FDECL(in_container,(struct obj *));
  683. X! static int FDECL(ck_container,(struct obj *));
  684. X! static int FDECL(ck_bag,(struct obj *));
  685. X! static int FDECL(out_container,(struct obj *));
  686. X! #else
  687. X! int FDECL(in_container,(struct obj *));
  688. X! int FDECL(ck_container,(struct obj *));
  689. X! int FDECL(ck_bag,(struct obj *));
  690. X! int FDECL(out_container,(struct obj *));
  691. X! #endif
  692. X  void FDECL(explode_bag,(struct obj *));
  693. X  
  694. X! #ifdef OVLB
  695. X  
  696. X  static const char nearloadmsg[] = "have a little trouble lifting";
  697. X  
  698. X--- 7,21 ----
  699. X   */
  700. X  
  701. X  #include    "hack.h"
  702. X! STATIC_PTR int FDECL(in_container,(struct obj *));
  703. X! STATIC_PTR int FDECL(ck_container,(struct obj *));
  704. X! STATIC_PTR int FDECL(ck_bag,(struct obj *));
  705. X! STATIC_PTR int FDECL(out_container,(struct obj *));
  706. X  void FDECL(explode_bag,(struct obj *));
  707. X  
  708. X! #define DELTA_CWT(cont) ((cont)->cursed?(obj->owt*2):(obj->owt/((cont)->blessed?4:2)) + 1)
  709. X! 
  710. X! #ifdef OVL0
  711. X  
  712. X  static const char nearloadmsg[] = "have a little trouble lifting";
  713. X  
  714. X***************
  715. X*** 257,265 ****
  716. X          if(wt > 0) {
  717. X              if(obj->quan > 1) {
  718. X                  /* see how many we can lift */
  719. X!                 int savequan = obj->quan;
  720. X                  int iw = inv_weight();
  721. X!                 int qq;
  722. X                  for(qq = 1; qq < savequan; qq++){
  723. X                      obj->quan = qq;
  724. X                      if(iw + weight(obj) > 0)
  725. X--- 252,260 ----
  726. X          if(wt > 0) {
  727. X              if(obj->quan > 1) {
  728. X                  /* see how many we can lift */
  729. X!                 unsigned savequan = obj->quan;
  730. X                  int iw = inv_weight();
  731. X!                 unsigned qq;
  732. X                  for(qq = 1; qq < savequan; qq++){
  733. X                      obj->quan = qq;
  734. X                      if(iw + weight(obj) > 0)
  735. X***************
  736. X*** 274,280 ****
  737. X                  You("can only carry %s of the %s lying here.",
  738. X                          (qq == 1) ? "one" : "some",
  739. X                          doname(obj));
  740. X!                     obj3 = splitobj(obj, qq);
  741. X                      if(obj3->otyp == SCR_SCARE_MONSTER)
  742. X                          if(obj3->spe) obj->spe = 0;
  743. X                      goto lift_some;
  744. X--- 269,275 ----
  745. X                  You("can only carry %s of the %s lying here.",
  746. X                          (qq == 1) ? "one" : "some",
  747. X                          doname(obj));
  748. X!                     obj3 = splitobj(obj, (int)qq);
  749. X                      if(obj3->otyp == SCR_SCARE_MONSTER)
  750. X                          if(obj3->spe) obj->spe = 0;
  751. X                      goto lift_some;
  752. X***************
  753. X*** 296,303 ****
  754. X                  if(obj->spe) obj->spe = 0;
  755. X              break;
  756. X          }
  757. X!         { int pickquan = obj->quan;
  758. X!           int mergquan;
  759. X  
  760. X            obj = pick_obj(obj);
  761. X            if(wt > -5) You(nearloadmsg);
  762. X--- 291,298 ----
  763. X                  if(obj->spe) obj->spe = 0;
  764. X              break;
  765. X          }
  766. X!         { unsigned pickquan = obj->quan;
  767. X!           unsigned mergquan;
  768. X  
  769. X            obj = pick_obj(obj);
  770. X            if(wt > -5) You(nearloadmsg);
  771. X***************
  772. X*** 324,329 ****
  773. X--- 319,327 ----
  774. X      return(addinv(otmp));    /* might merge it with other objects */
  775. X  }
  776. X  
  777. X+ #endif /* OVL1 */
  778. X+ #ifdef OVLB
  779. X+ 
  780. X  int
  781. X  doloot() {    /* loot a container on the floor. */
  782. X  
  783. X***************
  784. X*** 367,379 ****
  785. X  }
  786. X  
  787. X  static
  788. X! struct obj *current_container;    /* a local variable of use_container, to be
  789. X                  used by its local procedures in/ck_container */
  790. X  #define Icebox (current_container->otyp == ICE_BOX)
  791. X  int baggone;    /* used in askchain so bag isn't used after explosion */
  792. X  
  793. X  #endif /* OVLB */
  794. X! #ifdef OVL0
  795. X  
  796. X  void
  797. X  inc_cwt(cobj, obj)
  798. X--- 365,377 ----
  799. X  }
  800. X  
  801. X  static
  802. X! struct obj NEARDATA *current_container;    /* a local variable of use_container, to be
  803. X                  used by its local procedures in/ck_container */
  804. X  #define Icebox (current_container->otyp == ICE_BOX)
  805. X  int baggone;    /* used in askchain so bag isn't used after explosion */
  806. X  
  807. X  #endif /* OVLB */
  808. X! #ifdef OVL1
  809. X  
  810. X  void
  811. X  inc_cwt(cobj, obj)
  812. X***************
  813. X*** 380,396 ****
  814. X  register struct obj *cobj, *obj;
  815. X  {
  816. X      if (cobj->otyp == BAG_OF_HOLDING)
  817. X!         cobj->owt += (cobj->cursed?(obj->owt*2):(obj->owt/(cobj->blessed?4:2)) + 1);
  818. X      else    cobj->owt += obj->owt;
  819. X  }
  820. X  
  821. X! #endif /* OVL0 */
  822. X  #ifdef OVLB
  823. X  
  824. X! #ifndef OVERLAY
  825. X! static 
  826. X! #endif
  827. X! int
  828. X  in_container(obj)
  829. X  register struct obj *obj;
  830. X  {
  831. X--- 378,391 ----
  832. X  register struct obj *cobj, *obj;
  833. X  {
  834. X      if (cobj->otyp == BAG_OF_HOLDING)
  835. X!         cobj->owt += DELTA_CWT(cobj);
  836. X      else    cobj->owt += obj->owt;
  837. X  }
  838. X  
  839. X! #endif /* OVL1 */
  840. X  #ifdef OVLB
  841. X  
  842. X! STATIC_PTR int
  843. X  in_container(obj)
  844. X  register struct obj *obj;
  845. X  {
  846. X***************
  847. X*** 466,475 ****
  848. X      return(1);
  849. X  }
  850. X  
  851. X! #ifndef OVERLAY
  852. X! static 
  853. X! #endif
  854. X! int
  855. X  ck_container(obj)
  856. X  register struct obj *obj;
  857. X  {
  858. X--- 461,467 ----
  859. X      return(1);
  860. X  }
  861. X  
  862. X! STATIC_PTR int
  863. X  ck_container(obj)
  864. X  register struct obj *obj;
  865. X  {
  866. X***************
  867. X*** 479,488 ****
  868. X  /* ck_bag() needs a formal argument to make the overlay/prototype mechanism
  869. X   * work right */
  870. X  /*ARGSUSED*/
  871. X! #ifndef OVERLAY
  872. X! static 
  873. X! #endif
  874. X! int
  875. X  ck_bag(obj)
  876. X  struct obj *obj;
  877. X  {
  878. X--- 471,477 ----
  879. X  /* ck_bag() needs a formal argument to make the overlay/prototype mechanism
  880. X   * work right */
  881. X  /*ARGSUSED*/
  882. X! STATIC_PTR int
  883. X  ck_bag(obj)
  884. X  struct obj *obj;
  885. X  {
  886. X***************
  887. X*** 489,502 ****
  888. X      return(!baggone);
  889. X  }
  890. X  
  891. X! #ifndef OVERLAY
  892. X! static 
  893. X! #endif
  894. X! int
  895. X  out_container(obj)
  896. X  register struct obj *obj;
  897. X  {
  898. X!     register struct obj *otmp;
  899. X      register boolean near_capacity = (inv_weight() > -5);
  900. X  
  901. X      if(inv_cnt() >= 52) {
  902. X--- 478,488 ----
  903. X      return(!baggone);
  904. X  }
  905. X  
  906. X! STATIC_PTR int
  907. X  out_container(obj)
  908. X  register struct obj *obj;
  909. X  {
  910. X!     register struct obj *otmp, *ootmp;
  911. X      register boolean near_capacity = (inv_weight() > -5);
  912. X  
  913. X      if(inv_cnt() >= 52) {
  914. X***************
  915. X*** 503,509 ****
  916. X          pline("You have no room to hold anything else.");
  917. X          return(0);
  918. X      }
  919. X!     if(obj->otyp != LOADSTONE && inv_weight() + (int)obj->owt > 0) {
  920. X          char buf[BUFSZ];
  921. X  
  922. X          Strcpy(buf, doname(obj));
  923. X--- 489,498 ----
  924. X          pline("You have no room to hold anything else.");
  925. X          return(0);
  926. X      }
  927. X!     if(obj->otyp != LOADSTONE && inv_weight() + (int)obj->owt -
  928. X!        (carried(current_container) ?
  929. X!         (current_container->otyp == BAG_OF_HOLDING ?
  930. X!             (int)DELTA_CWT(current_container) : (int)obj->owt) : 0) > 0) {
  931. X          char buf[BUFSZ];
  932. X  
  933. X          Strcpy(buf, doname(obj));
  934. X***************
  935. X*** 528,558 ****
  936. X      if (Icebox) obj->age = monstermoves - obj->age;
  937. X      /* simulated point of time */
  938. X  
  939. X!     (void) addinv(obj);
  940. X      if (near_capacity) You("have a little trouble removing");
  941. X!     prinv(obj);
  942. X      return 0;
  943. X  }
  944. X  
  945. X- void
  946. X- get_all_from_box() {
  947. X-     register struct obj *otmp, *cobj, *ootmp, *nxobj;
  948. X- 
  949. X-     for(otmp = invent; otmp; otmp = otmp->nobj) {
  950. X-         cobj = otmp;
  951. X-         if(Is_container(otmp)) {
  952. X-         current_container = otmp;
  953. X-         for(ootmp=fcobj,nxobj=(fcobj ? fcobj->nobj : 0); ootmp;
  954. X-                 ootmp=nxobj,nxobj=(ootmp ? ootmp->nobj : 0) )
  955. X-             if(ootmp->cobj == cobj)
  956. X-             (void)out_container(ootmp);
  957. X-         }
  958. X-     }
  959. X-     return;
  960. X- }
  961. X- 
  962. X  /* for getobj: 0: allow cnt; #: allow all types; %: expect food */
  963. X! static const char frozen_food[] = { '0', '#', FOOD_SYM, 0 };
  964. X  
  965. X  void
  966. X  use_container(obj, held)
  967. X--- 517,530 ----
  968. X      if (Icebox) obj->age = monstermoves - obj->age;
  969. X      /* simulated point of time */
  970. X  
  971. X!     ootmp = addinv(obj);
  972. X      if (near_capacity) You("have a little trouble removing");
  973. X!     prinv(ootmp);
  974. X      return 0;
  975. X  }
  976. X  
  977. X  /* for getobj: 0: allow cnt; #: allow all types; %: expect food */
  978. X! static const char NEARDATA frozen_food[] = { '0', '#', FOOD_SYM, 0 };
  979. X  
  980. X  void
  981. X  use_container(obj, held)
  982. X***************
  983. X*** 662,669 ****
  984. X  dec_cwt(cobj, obj)
  985. X  register struct obj *cobj, *obj;
  986. X  {
  987. X!     if (Is_mbag(cobj))
  988. X!         cobj->owt -= (cobj->cursed?(obj->owt*2):(obj->owt/(cobj->blessed?4:2)) + 1);
  989. X      else    cobj->owt -= obj->owt;
  990. X  
  991. X      if(cobj->owt < objects[cobj->otyp].oc_weight)
  992. X--- 634,641 ----
  993. X  dec_cwt(cobj, obj)
  994. X  register struct obj *cobj, *obj;
  995. X  {
  996. X!     if (cobj->otyp == BAG_OF_HOLDING)
  997. X!         cobj->owt -= DELTA_CWT(cobj);
  998. X      else    cobj->owt -= obj->owt;
  999. X  
  1000. X      if(cobj->owt < objects[cobj->otyp].oc_weight)
  1001. X*** src/Old/polyself.c    Sun Jun  3 14:03:05 1990
  1002. X--- src/polyself.c    Thu May 31 22:11:33 1990
  1003. X***************
  1004. X*** 5,15 ****
  1005. X  #include "hack.h"
  1006. X  
  1007. X  #ifdef POLYSELF
  1008. X  static void NDECL(break_armor);
  1009. X  static void FDECL(drop_weapon,(int));
  1010. X  static void NDECL(skinback);
  1011. X  static void NDECL(uunstick);
  1012. X- #ifdef OVLB
  1013. X  static boolean sticky;
  1014. X  #endif /* OVLB */
  1015. X  #endif
  1016. X--- 5,15 ----
  1017. X  #include "hack.h"
  1018. X  
  1019. X  #ifdef POLYSELF
  1020. X+ #ifdef OVLB
  1021. X  static void NDECL(break_armor);
  1022. X  static void FDECL(drop_weapon,(int));
  1023. X  static void NDECL(skinback);
  1024. X  static void NDECL(uunstick);
  1025. X  static boolean sticky;
  1026. X  #endif /* OVLB */
  1027. X  #endif
  1028. X***************
  1029. X*** 629,635 ****
  1030. X  #ifdef MACOS
  1031. X              char mac_tbuf[80];
  1032. X              if(!flags.silent) SysBeep(1);
  1033. X!             sprintf(mac_tbuf, "Really confuse %s?", mon_nam(mtmp));
  1034. X              if(UseMacAlertText(128, mac_tbuf) != 1) continue;
  1035. X  #else
  1036. X              pline("Really confuse %s? ", mon_nam(mtmp));
  1037. X--- 629,635 ----
  1038. X  #ifdef MACOS
  1039. X              char mac_tbuf[80];
  1040. X              if(!flags.silent) SysBeep(1);
  1041. X!             Sprintf(mac_tbuf, "Really confuse %s?", mon_nam(mtmp));
  1042. X              if(UseMacAlertText(128, mac_tbuf) != 1) continue;
  1043. X  #else
  1044. X              pline("Really confuse %s? ", mon_nam(mtmp));
  1045. X***************
  1046. X*** 705,710 ****
  1047. X--- 705,712 ----
  1048. X  }
  1049. X  #endif
  1050. X  
  1051. X+ #endif /* OVLB */
  1052. X+ #ifdef OVL1
  1053. X  const char *
  1054. X  body_part(part)
  1055. X  int part;
  1056. X***************
  1057. X*** 713,745 ****
  1058. X       * plus the trailing null, after pluralizing (since sometimes a
  1059. X       * buffer is made a fixed size and must be able to hold it)
  1060. X       */
  1061. X!     static const char *humanoid_parts[] = { "arm", "eye", "face", "finger",
  1062. X          "fingertip", "foot", "hand", "handed", "head", "leg",
  1063. X                  "light headed", "neck", "spine", "toe" };
  1064. X  #ifdef POLYSELF
  1065. X!     static const char *jelly_parts[] = { "pseudopod", "dark spot", "front",
  1066. X          "pseudopod extension", "pseudopod extremity",
  1067. X          "pseudopod root", "grasp", "grasped", "cerebral area",
  1068. X          "lower pseudopod", "viscous", "middle", "surface",
  1069. X          "pseudopod extremity" },
  1070. X!     *animal_parts[] = { "forelimb", "eye", "face", "foreclaw", "claw tip",
  1071. X          "rear claw", "foreclaw", "clawed", "head", "rear limb",
  1072. X          "light headed", "neck", "spine", "rear claw tip" },
  1073. X!     *horse_parts[] = { "forelimb", "eye", "face", "forehoof", "hoof tip",
  1074. X          "rear hoof", "foreclaw", "hooved", "head", "rear limb",
  1075. X          "light headed", "neck", "backbone", "rear hoof tip" },
  1076. X!     *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
  1077. X          "tentacle tip", "lower appendage", "tentacle", "tentacled",
  1078. X          "body", "lower tentacle", "rotational", "equator", "body",
  1079. X          "lower tentacle tip" },
  1080. X!     *fungus_parts[] = { "mycelium", "visual area", "front", "hypha",
  1081. X          "hypha", "root", "strand", "stranded", "cap area",
  1082. X          "rhizome", "sporulated", "stalk", "root", "rhizome tip" },
  1083. X!     *vortex_parts[] = { "region", "eye", "front", "minor current",
  1084. X          "minor current", "lower current", "swirl", "swirled",
  1085. X          "central core", "lower current", "addled", "center",
  1086. X          "currents", "edge" },
  1087. X!     *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
  1088. X          "large scale tip", "rear region", "scale gap", "scale gapped",
  1089. X          "head", "rear region", "light headed", "neck", "length",
  1090. X          "rear scale" };
  1091. X--- 715,747 ----
  1092. X       * plus the trailing null, after pluralizing (since sometimes a
  1093. X       * buffer is made a fixed size and must be able to hold it)
  1094. X       */
  1095. X!     static const char NEARDATA *humanoid_parts[] = { "arm", "eye", "face", "finger",
  1096. X          "fingertip", "foot", "hand", "handed", "head", "leg",
  1097. X                  "light headed", "neck", "spine", "toe" };
  1098. X  #ifdef POLYSELF
  1099. X!     static const char NEARDATA *jelly_parts[] = { "pseudopod", "dark spot", "front",
  1100. X          "pseudopod extension", "pseudopod extremity",
  1101. X          "pseudopod root", "grasp", "grasped", "cerebral area",
  1102. X          "lower pseudopod", "viscous", "middle", "surface",
  1103. X          "pseudopod extremity" },
  1104. X!     NEARDATA *animal_parts[] = { "forelimb", "eye", "face", "foreclaw", "claw tip",
  1105. X          "rear claw", "foreclaw", "clawed", "head", "rear limb",
  1106. X          "light headed", "neck", "spine", "rear claw tip" },
  1107. X!     NEARDATA *horse_parts[] = { "forelimb", "eye", "face", "forehoof", "hoof tip",
  1108. X          "rear hoof", "foreclaw", "hooved", "head", "rear limb",
  1109. X          "light headed", "neck", "backbone", "rear hoof tip" },
  1110. X!     NEARDATA *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
  1111. X          "tentacle tip", "lower appendage", "tentacle", "tentacled",
  1112. X          "body", "lower tentacle", "rotational", "equator", "body",
  1113. X          "lower tentacle tip" },
  1114. X!     NEARDATA *fungus_parts[] = { "mycelium", "visual area", "front", "hypha",
  1115. X          "hypha", "root", "strand", "stranded", "cap area",
  1116. X          "rhizome", "sporulated", "stalk", "root", "rhizome tip" },
  1117. X!     NEARDATA *vortex_parts[] = { "region", "eye", "front", "minor current",
  1118. X          "minor current", "lower current", "swirl", "swirled",
  1119. X          "central core", "lower current", "addled", "center",
  1120. X          "currents", "edge" },
  1121. X!     NEARDATA *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
  1122. X          "large scale tip", "rear region", "scale gap", "scale gapped",
  1123. X          "head", "rear region", "light headed", "neck", "length",
  1124. X          "rear scale" };
  1125. X***************
  1126. X*** 761,767 ****
  1127. X  #endif
  1128. X  }
  1129. X  
  1130. X! #endif /* OVLB */
  1131. X  #ifdef OVL0
  1132. X  
  1133. X  int
  1134. X--- 763,769 ----
  1135. X  #endif
  1136. X  }
  1137. X  
  1138. X! #endif /* OVL1 */
  1139. X  #ifdef OVL0
  1140. X  
  1141. X  int
  1142. X*** src/Old/potion.c    Sun Jun  3 14:03:42 1990
  1143. X--- src/potion.c    Sat Jun  2 19:45:47 1990
  1144. X***************
  1145. X*** 5,11 ****
  1146. X  #include "hack.h"
  1147. X  
  1148. X  #ifdef OVLB
  1149. X! static int nothing, unkn;
  1150. X  #endif /* OVLB */
  1151. X  
  1152. X  #ifdef WORM
  1153. X--- 5,14 ----
  1154. X  #include "hack.h"
  1155. X  
  1156. X  #ifdef OVLB
  1157. X! static void NDECL(ghost_from_bottle);
  1158. X! static boolean FDECL(neutralizes, (struct obj *,struct obj *));
  1159. X! 
  1160. X! static int NEARDATA nothing, NEARDATA unkn;
  1161. X  #endif /* OVLB */
  1162. X  
  1163. X  #ifdef WORM
  1164. X***************
  1165. X*** 22,28 ****
  1166. X  
  1167. X  #ifdef OVLB
  1168. X  
  1169. X! static const char beverages[] = { POTION_SYM, 0 };
  1170. X  
  1171. X  void
  1172. X  make_confused(xtime,talk)
  1173. X--- 25,31 ----
  1174. X  
  1175. X  #ifdef OVLB
  1176. X  
  1177. X! static const char NEARDATA beverages[] = { POTION_SYM, 0 };
  1178. X  
  1179. X  void
  1180. X  make_confused(xtime,talk)
  1181. X***************
  1182. X*** 157,167 ****
  1183. X  static void
  1184. X  ghost_from_bottle()
  1185. X  {
  1186. X!     if(!makemon(&mons[PM_GHOST], u.ux, u.uy)){
  1187. X          pline("This bottle turns out to be empty.");
  1188. X          return;
  1189. X      }
  1190. X!     pline("As you open the bottle, an enormous ghost emerges!");
  1191. X      if(flags.verbose)
  1192. X          You("are frightened to death, and unable to move.");
  1193. X      nomul(-3);
  1194. X--- 160,177 ----
  1195. X  static void
  1196. X  ghost_from_bottle()
  1197. X  {
  1198. X!     struct monst *mtmp = makemon(&mons[PM_GHOST], u.ux, u.uy);
  1199. X! 
  1200. X!     if (!mtmp) {
  1201. X          pline("This bottle turns out to be empty.");
  1202. X          return;
  1203. X      }
  1204. X!     if (Blind) {
  1205. X!         pline("As you open the bottle, something emerges.");
  1206. X!         return;
  1207. X!     }
  1208. X!     pline("As you open the bottle, an enormous %s emerges!",
  1209. X!         Hallucination ? rndmonnam() : "ghost");
  1210. X      if(flags.verbose)
  1211. X          You("are frightened to death, and unable to move.");
  1212. X      nomul(-3);
  1213. X***************
  1214. X*** 268,273 ****
  1215. X--- 278,285 ----
  1216. X              }
  1217. X              if(++i >= A_MAX) i = 0;
  1218. X              }
  1219. X+             if((ABASE(A_STR) == AMAX(A_STR)) && (u.uhs >= 3))
  1220. X+             losestr(1);        /* kludge - mrs */
  1221. X          }
  1222. X          break;
  1223. X      case POT_HALLUCINATION:
  1224. X***************
  1225. X*** 342,352 ****
  1226. X              unkn++;
  1227. X              You("have an uneasy feeling...");
  1228. X          } else {
  1229. X-             You("feel self-knowledgeable...");
  1230. X              if (otmp->blessed) {
  1231. X                  adjattrib(A_INT, 1, FALSE);
  1232. X                  adjattrib(A_WIS, 1, FALSE);
  1233. X              }
  1234. X              more();
  1235. X              enlightenment();
  1236. X              pline("The feeling subsides.");
  1237. X--- 354,364 ----
  1238. X              unkn++;
  1239. X              You("have an uneasy feeling...");
  1240. X          } else {
  1241. X              if (otmp->blessed) {
  1242. X                  adjattrib(A_INT, 1, FALSE);
  1243. X                  adjattrib(A_WIS, 1, FALSE);
  1244. X              }
  1245. X+             You("feel self-knowledgeable...");
  1246. X              more();
  1247. X              enlightenment();
  1248. X              pline("The feeling subsides.");
  1249. X***************
  1250. X*** 360,377 ****
  1251. X          else {
  1252. X               newsym(u.ux,u.uy);
  1253. X               if(!Blind)
  1254. X!                pline("Gee!  All of a sudden, you can't see yourself.");
  1255. X               else
  1256. X                 You("feel rather airy."), unkn++;
  1257. X          }
  1258. X          if (otmp->blessed && !(HInvis & INTRINSIC)) {
  1259. X  #ifndef MACOS
  1260. X              pline("Do you want the invisibility to be permanent? ");
  1261. X-             nothing = 0;
  1262. X              if (yn()=='n') HInvis += rn1(15,31);
  1263. X              else HInvis |= INTRINSIC;
  1264. X  #else
  1265. X-             nothing = 0;
  1266. X              if (UseMacAlertText(128,
  1267. X                  "Do you want the invisibility to be permanent ?")
  1268. X                  == 2) HInvis += rn1(15,31);
  1269. X--- 372,390 ----
  1270. X          else {
  1271. X               newsym(u.ux,u.uy);
  1272. X               if(!Blind)
  1273. X!                pline(Hallucination ?
  1274. X!              "Far out, man!  You can see right through yourself!" :
  1275. X!              "Gee!  All of a sudden, you can't see yourself.");
  1276. X               else
  1277. X                 You("feel rather airy."), unkn++;
  1278. X          }
  1279. X          if (otmp->blessed && !(HInvis & INTRINSIC)) {
  1280. X+             nothing = 0;
  1281. X  #ifndef MACOS
  1282. X              pline("Do you want the invisibility to be permanent? ");
  1283. X              if (yn()=='n') HInvis += rn1(15,31);
  1284. X              else HInvis |= INTRINSIC;
  1285. X  #else
  1286. X              if (UseMacAlertText(128,
  1287. X                  "Do you want the invisibility to be permanent ?")
  1288. X                  == 2) HInvis += rn1(15,31);
  1289. X***************
  1290. X*** 520,529 ****
  1291. X          if (otmp->cursed) {
  1292. X              unkn++;
  1293. X              /* they went up a level */
  1294. X!             if(dlevel > 1 && dlevel <= MAXLEVEL) { 
  1295. X                  You("rise up, through the ceiling!");
  1296. X                  goto_level(dlevel-1, FALSE, FALSE);
  1297. X              } else You("have an uneasy feeling.");
  1298. X              break;
  1299. X          }
  1300. X          pluslvl();
  1301. X--- 533,554 ----
  1302. X          if (otmp->cursed) {
  1303. X              unkn++;
  1304. X              /* they went up a level */
  1305. X! #ifdef ENDGAME
  1306. X!             if((dlevel > 1  || u.uhave_amulet) &&
  1307. X!                             dlevel <= MAXLEVEL) { 
  1308. X                  You("rise up, through the ceiling!");
  1309. X+                 goto_level((dlevel==1) ? ENDLEVEL
  1310. X+                     : dlevel-1, FALSE, FALSE);
  1311. X+             } else You("have an uneasy feeling.");
  1312. X+ #else
  1313. X+             if(dlevel > 1 && dlevel <= MAXLEVEL) {
  1314. X+                 You("rise up, through the ceiling!");
  1315. X+ #ifdef MACOS
  1316. X+                 segments |= SEG_POTION;
  1317. X+ #endif
  1318. X                  goto_level(dlevel-1, FALSE, FALSE);
  1319. X              } else You("have an uneasy feeling.");
  1320. X+ #endif
  1321. X              break;
  1322. X          }
  1323. X          pluslvl();
  1324. X***************
  1325. X*** 740,745 ****
  1326. X--- 765,772 ----
  1327. X                  if(!Blind)
  1328. X                  pline("%s looks healthier.", Monnam(mon));
  1329. X                  mon->mhp += d(2,6);
  1330. X+                 if (mon->mhp > mon->mhpmax)
  1331. X+                     mon->mhp = mon->mhpmax;
  1332. X              }
  1333. X          }
  1334. X          /* TO DO: Gremlins multiply when doused with water */
  1335. X***************
  1336. X*** 1023,1032 ****
  1337. X                  return(1);
  1338. X          }
  1339. X  
  1340. X!         obj->spe--; /* diluted */
  1341. X!         if (obj->otyp == POT_WATER)
  1342. X!             pline("The mixture bubbles violently, then clears.");
  1343. X!         else {
  1344. X              if (!Blind) {
  1345. X                  pline("The mixture looks %s.", objects[obj->otyp].oc_descr);
  1346. X                  obj->dknown = 1;
  1347. X--- 1050,1061 ----
  1348. X                  return(1);
  1349. X          }
  1350. X  
  1351. X!         if (obj->otyp == POT_WATER) {
  1352. X!             obj->spe = 0; /* in case it was diluted before */
  1353. X!             pline("The mixture bubbles violently%s.",
  1354. X!                 Blind ? "" : ", then clears");
  1355. X!         } else {
  1356. X!             obj->spe--; /* diluted */
  1357. X              if (!Blind) {
  1358. X                  pline("The mixture looks %s.", objects[obj->otyp].oc_descr);
  1359. X                  obj->dknown = 1;
  1360. X***************
  1361. X*** 1059,1064 ****
  1362. X--- 1088,1094 ----
  1363. X          potion->otyp = POT_WATER;
  1364. X          potion->blessed = 0;
  1365. X          potion->cursed = 0;
  1366. X+         potion->spe = 0;
  1367. X          return(1);
  1368. X      }
  1369. X  
  1370. X***************
  1371. X*** 1159,1181 ****
  1372. X  {
  1373. X      register struct obj    *objs;
  1374. X      register struct monst    *mtmp;
  1375. X!     boolean mfound=FALSE;
  1376. X  
  1377. X      if(!fobj) {
  1378. X          for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  1379. X!             if (mtmp->minvent) {
  1380. X!                 /* OK, it's used for 2 different things */
  1381. X!                 mfound = TRUE;
  1382. X                  break;
  1383. X              }
  1384. X          }
  1385. X!         if (!mfound) {
  1386. X              if (otmp)
  1387. X                  strange_feeling(otmp, "You feel a pull downward.");
  1388. X              return(1);
  1389. X          }
  1390. X      }
  1391. X!     mfound = FALSE;
  1392. X      for(objs = fobj; objs; objs = objs->nobj)
  1393. X          if(objs->ox != u.ux || objs->oy != u.uy)
  1394. X              goto outobjmap;
  1395. X--- 1189,1213 ----
  1396. X  {
  1397. X      register struct obj    *objs;
  1398. X      register struct monst    *mtmp;
  1399. X!     boolean mfound=FALSE, mofound=FALSE;
  1400. X  
  1401. X      if(!fobj) {
  1402. X          for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  1403. X!             /* mofound can be 1 of 2 completely different things,
  1404. X!              * either of which stops the "strange feeling"...
  1405. X!              */
  1406. X!             if (mtmp->minvent || (mtmp->mimic && otmp->cursed)) {
  1407. X!                 mofound = TRUE;
  1408. X                  break;
  1409. X              }
  1410. X          }
  1411. X!         if (!mofound) {
  1412. X              if (otmp)
  1413. X                  strange_feeling(otmp, "You feel a pull downward.");
  1414. X              return(1);
  1415. X          }
  1416. X      }
  1417. X!     if (mofound) goto outobjmap;
  1418. X      for(objs = fobj; objs; objs = objs->nobj)
  1419. X          if(objs->ox != u.ux || objs->oy != u.uy)
  1420. X              goto outobjmap;
  1421. X*** src/Old/pray.c    Sun Jun  3 14:04:30 1990
  1422. X--- src/pray.c    Sat May 12 16:07:09 1990
  1423. X***************
  1424. X*** 650,658 ****
  1425. X          case 6:    pline ("An object appears at your %s!",
  1426. X                  makeplural(body_part(FOOT)));
  1427. X  #ifdef SPELLS
  1428. X!             bless(mkobj_at(SPBOOK_SYM, u.ux, u.uy));
  1429. X  #else
  1430. X!             bless(mkobj_at(SCROLL_SYM, u.ux, u.uy));
  1431. X  #endif
  1432. X              break;
  1433. X  
  1434. X--- 650,658 ----
  1435. X          case 6:    pline ("An object appears at your %s!",
  1436. X                  makeplural(body_part(FOOT)));
  1437. X  #ifdef SPELLS
  1438. X!             bless(mkobj_at(SPBOOK_SYM, u.ux, u.uy, TRUE));
  1439. X  #else
  1440. X!             bless(mkobj_at(SCROLL_SYM, u.ux, u.uy, TRUE));
  1441. X  #endif
  1442. X              break;
  1443. X  
  1444. X***************
  1445. X*** 692,698 ****
  1446. X  }
  1447. X  
  1448. X  #ifdef ENDGAME
  1449. X! static const char sacrifice_types[] = { FOOD_SYM, AMULET_SYM, 0 };
  1450. X  #endif
  1451. X  
  1452. X  static void
  1453. X--- 692,698 ----
  1454. X  }
  1455. X  
  1456. X  #ifdef ENDGAME
  1457. X! static const char NEARDATA sacrifice_types[] = { FOOD_SYM, AMULET_SYM, 0 };
  1458. X  #endif
  1459. X  
  1460. X  static void
  1461. X***************
  1462. X*** 772,789 ****
  1463. X          } else {
  1464. X              register struct monst *dmon;
  1465. X      /* Human sacrifice on a chaotic altar is equivalent to demon summoning */
  1466. X! #ifdef THEOLOGY
  1467. X              if (altaralign == U_CHAOTIC)
  1468. X                  pline("The blood covers the altar!");
  1469. X              else {
  1470. X! #endif
  1471. X      pline("The blood floods over the altar, which vanishes in %s cloud!",
  1472. X                    an(Hallucination ? hcolor() : black));
  1473. X                  levl[u.ux][u.uy].typ = ROOM;
  1474. X                  levl[u.ux][u.uy].altarmask = 0;
  1475. X! #ifdef THEOLOGY
  1476. X              }
  1477. X! #endif
  1478. X              change_luck(2);
  1479. X              if(Invisible) newsym(u.ux, u.uy);
  1480. X              if(dmon = makemon(&mons[dlord()], u.ux, u.uy)) {
  1481. X--- 772,789 ----
  1482. X          } else {
  1483. X              register struct monst *dmon;
  1484. X      /* Human sacrifice on a chaotic altar is equivalent to demon summoning */
  1485. X! # ifdef THEOLOGY
  1486. X              if (altaralign == U_CHAOTIC)
  1487. X                  pline("The blood covers the altar!");
  1488. X              else {
  1489. X! # endif
  1490. X      pline("The blood floods over the altar, which vanishes in %s cloud!",
  1491. X                    an(Hallucination ? hcolor() : black));
  1492. X                  levl[u.ux][u.uy].typ = ROOM;
  1493. X                  levl[u.ux][u.uy].altarmask = 0;
  1494. X! # ifdef THEOLOGY
  1495. X              }
  1496. X! # endif
  1497. X              change_luck(2);
  1498. X              if(Invisible) newsym(u.ux, u.uy);
  1499. X              if(dmon = makemon(&mons[dlord()], u.ux, u.uy)) {
  1500. X***************
  1501. X*** 817,822 ****
  1502. X--- 817,823 ----
  1503. X  #ifdef __GNULINT__
  1504. X          else { impossible("Bad unicorn type??"); unicalign = 0; }
  1505. X  #endif
  1506. X+ #ifdef ALTARS
  1507. X          /* If same as altar, always a very bad action. */
  1508. X          if (unicalign == altaralign) {
  1509. X              pline("Such an action is an insult to %s!", (unicalign== -1)
  1510. X***************
  1511. X*** 832,840 ****
  1512. X              else You("feel you are thoroughly on the right path.");
  1513. X              u.ualign = ALIGNLIM;
  1514. X              value += 3;
  1515. X!         } else if (unicalign == u.ualigntyp) {
  1516. X          /* If sacrificing unicorn of your alignment to altar not of */
  1517. X          /* your alignment, your god gets angry and it's a conversion */
  1518. X              u.ualign = -1;
  1519. X              value = 1;
  1520. X          } else value += 3;
  1521. X--- 833,843 ----
  1522. X              else You("feel you are thoroughly on the right path.");
  1523. X              u.ualign = ALIGNLIM;
  1524. X              value += 3;
  1525. X!         } else
  1526. X          /* If sacrificing unicorn of your alignment to altar not of */
  1527. X          /* your alignment, your god gets angry and it's a conversion */
  1528. X+ #endif
  1529. X+         if (unicalign == u.ualigntyp) {
  1530. X              u.ualign = -1;
  1531. X              value = 1;
  1532. X          } else value += 3;
  1533. X***************
  1534. X*** 959,964 ****
  1535. X--- 962,968 ----
  1536. X              You("feel the power of %s increase.",
  1537. X                      u_gname());
  1538. X              change_luck(1);
  1539. X+             /* Yes, this is supposed to be &=, not |= */
  1540. X              levl[u.ux][u.uy].altarmask &= A_SHRINE;
  1541. X              /* the following accommodates stupid compilers */
  1542. X              levl[u.ux][u.uy].altarmask =
  1543. X*** src/Old/pri.c    Sun Jun  3 14:05:14 1990
  1544. X--- src/pri.c    Thu May 31 22:13:26 1990
  1545. X***************
  1546. X*** 5,43 ****
  1547. X  #define MONATTK_H    /* comment line for pre-compiled headers */
  1548. X  /* block some unused #defines to avoid overloading some cpp's */
  1549. X  #include "hack.h"
  1550. X- #include <ctype.h>  /* for isalpha() */
  1551. X  #if defined(ALTARS) && defined(THEOLOGY)
  1552. X  #include "epri.h"
  1553. X  #endif
  1554. X  #include "termcap.h"
  1555. X  
  1556. X! OSTATIC void FDECL(hilite, (int,int,UCHAR_P, UCHAR_P));
  1557. X! OSTATIC void FDECL(cornbot, (int));
  1558. X  #ifdef TEXTCOLOR
  1559. X! OSTATIC uchar FDECL(mimic_color, (struct monst *));
  1560. X  #endif
  1561. X  
  1562. X! #ifndef ASCIIGRAPH
  1563. X  # define g_putch  (void) putchar
  1564. X! #endif
  1565. X  
  1566. X! #ifndef g_putch
  1567. X! #ifdef OVL0
  1568. X  static boolean GFlag = FALSE; /* graphic flag */
  1569. X  #endif /* OVL0 */
  1570. X- #endif
  1571. X  
  1572. X  /* 100 suffices for bot(); must be larger than COLNO */
  1573. X  #define MAXCO 100
  1574. X! VSTATIC char oldbot1[MAXCO], newbot1[MAXCO];
  1575. X! VSTATIC char oldbot2[MAXCO], newbot2[MAXCO];
  1576. X  #ifdef OVL2
  1577. X! static const char *dispst = "*0#@#0#*0#@#0#*0#@#0#*0#@#0#*0#@#0#*";
  1578. X  #endif /* OVL2 */
  1579. X  #ifndef OVLB
  1580. X! OSTATIC int mrank_sz;
  1581. X  #else /* OVLB */
  1582. X! XSTATIC int mrank_sz = 0;  /* loaded by max_rank_sz (called in u_init) */
  1583. X  #endif /* OVLB */
  1584. X  
  1585. X  #ifdef CLIPPING
  1586. X--- 5,49 ----
  1587. X  #define MONATTK_H    /* comment line for pre-compiled headers */
  1588. X  /* block some unused #defines to avoid overloading some cpp's */
  1589. X  #include "hack.h"
  1590. X  #if defined(ALTARS) && defined(THEOLOGY)
  1591. X  #include "epri.h"
  1592. X  #endif
  1593. X  #include "termcap.h"
  1594. X  
  1595. X! #ifdef OVL0
  1596. X! static void FDECL(fillbot, (int,char *,char *));
  1597. X! static void NDECL(bot1);
  1598. X! static void NDECL(bot2);
  1599. X! #endif /* OVL0 */
  1600. X! 
  1601. X! STATIC_DCL void FDECL(hilite, (int,int,UCHAR_P, UCHAR_P));
  1602. X! STATIC_DCL void FDECL(cornbot, (int));
  1603. X  #ifdef TEXTCOLOR
  1604. X! STATIC_DCL uchar FDECL(mimic_color, (struct monst *));
  1605. X  #endif
  1606. X  
  1607. X! #ifdef OVL0
  1608. X! # ifndef ASCIIGRAPH
  1609. X  # define g_putch  (void) putchar
  1610. X! # endif /* ASCIIGRAPH */
  1611. X  
  1612. X! # ifndef g_putch
  1613. X! static void FDECL(g_putch, (UCHAR_P));
  1614. X  static boolean GFlag = FALSE; /* graphic flag */
  1615. X+ # endif
  1616. X  #endif /* OVL0 */
  1617. X  
  1618. X  /* 100 suffices for bot(); must be larger than COLNO */
  1619. X  #define MAXCO 100
  1620. X! STATIC_VAR char NEARDATA oldbot1[MAXCO], NEARDATA newbot1[MAXCO];
  1621. X! STATIC_VAR char NEARDATA oldbot2[MAXCO], NEARDATA newbot2[MAXCO];
  1622. X  #ifdef OVL2
  1623. X! static const char NEARDATA *dispst = "*0#@#0#*0#@#0#*0#@#0#*0#@#0#*0#@#0#*";
  1624. X  #endif /* OVL2 */
  1625. X  #ifndef OVLB
  1626. X! STATIC_DCL int mrank_sz;
  1627. X  #else /* OVLB */
  1628. X! STATIC_OVL int NEARDATA mrank_sz = 0;  /* loaded by max_rank_sz (called in u_init) */
  1629. X  #endif /* OVLB */
  1630. X  
  1631. X  #ifdef CLIPPING
  1632. X***************
  1633. X*** 126,131 ****
  1634. X--- 132,140 ----
  1635. X  #endif
  1636. X  }
  1637. X  
  1638. X+ #endif /* OVLB */
  1639. X+ #ifdef OVL0
  1640. X+ 
  1641. X  #ifdef CLIPPING
  1642. X  void
  1643. X  cliparound(x, y)
  1644. X***************
  1645. X*** 160,168 ****
  1646. X  }
  1647. X  #endif /* CLIPPING */
  1648. X  
  1649. X- #endif /* OVLB */
  1650. X- #ifdef OVL0
  1651. X- 
  1652. X  /*
  1653. X   *  Allow for a different implementation than this...
  1654. X   */
  1655. X--- 169,174 ----
  1656. X***************
  1657. X*** 173,179 ****
  1658. X  g_putch(ch)
  1659. X  uchar ch;
  1660. X  {
  1661. X!     if (IBMgraphics)    /* IBM-compatible displays don't need other stuff */
  1662. X          (void) putchar(ch);
  1663. X      else if (ch & 0x80) {
  1664. X          if (!GFlag) {
  1665. X--- 179,186 ----
  1666. X  g_putch(ch)
  1667. X  uchar ch;
  1668. X  {
  1669. X!     if (flags.IBMgraphics)
  1670. X!         /* IBM-compatible displays don't need other stuff */
  1671. X          (void) putchar(ch);
  1672. X      else if (ch & 0x80) {
  1673. X          if (!GFlag) {
  1674. X***************
  1675. X*** 272,278 ****
  1676. X      register const char *ch;
  1677. X      register struct monst *mtmp = 0;
  1678. X  
  1679. X!     if((x != u.ux) || (y != u.uy)) {
  1680. X          if(!(mtmp = m_at(x, y))) {
  1681. X  
  1682. X          impossible("shield effect at %d,%d", x, y);
  1683. X--- 279,289 ----
  1684. X      register const char *ch;
  1685. X      register struct monst *mtmp = 0;
  1686. X  
  1687. X!     nscr();
  1688. X! 
  1689. X!     if((x == u.ux) && (y == u.uy)) 
  1690. X!         curs_on_u();
  1691. X!     else {
  1692. X          if(!(mtmp = m_at(x, y))) {
  1693. X  
  1694. X          impossible("shield effect at %d,%d", x, y);
  1695. X***************
  1696. X*** 429,435 ****
  1697. X  #endif /* OVL0 */
  1698. X  #ifdef OVLB
  1699. X  
  1700. X! XSTATIC void
  1701. X  cornbot(lth)
  1702. X  register int lth;
  1703. X  {
  1704. X--- 440,446 ----
  1705. X  #endif /* OVL0 */
  1706. X  #ifdef OVLB
  1707. X  
  1708. X! STATIC_OVL void
  1709. X  cornbot(lth)
  1710. X  register int lth;
  1711. X  {
  1712. X***************
  1713. X*** 677,683 ****
  1714. X  /* Make sure that there are 18 entries in the rank arrays. */
  1715. X  /* 0 and even entries are male ranks, odd entries are female. */
  1716. X  
  1717. X! static const char *mage_ranks[] = {
  1718. X      "Evoker",
  1719. X      "Evoker",
  1720. X      "Conjurer",
  1721. X--- 688,694 ----
  1722. X  /* Make sure that there are 18 entries in the rank arrays. */
  1723. X  /* 0 and even entries are male ranks, odd entries are female. */
  1724. X  
  1725. X! static const char NEARDATA *mage_ranks[] = {
  1726. X      "Evoker",
  1727. X      "Evoker",
  1728. X      "Conjurer",
  1729. X***************
  1730. X*** 698,704 ****
  1731. X      "Mage"
  1732. X  };
  1733. X  
  1734. X! static const char *priest_ranks[] = {
  1735. X      "Aspirant",
  1736. X      "Aspirant",
  1737. X      "Acolyte",
  1738. X--- 709,715 ----
  1739. X      "Mage"
  1740. X  };
  1741. X  
  1742. X! static const char NEARDATA *priest_ranks[] = {
  1743. X      "Aspirant",
  1744. X      "Aspirant",
  1745. X      "Acolyte",
  1746. X***************
  1747. X*** 719,725 ****
  1748. X      "High Priestess"
  1749. X  };
  1750. X  
  1751. X! static const char *thief_ranks[] = {
  1752. X      "Footpad",
  1753. X      "Footpad",
  1754. X      "Cutpurse",
  1755. X--- 730,736 ----
  1756. X      "High Priestess"
  1757. X  };
  1758. X  
  1759. X! static const char NEARDATA *thief_ranks[] = {
  1760. X      "Footpad",
  1761. X      "Footpad",
  1762. X      "Cutpurse",
  1763. X***************
  1764. X*** 740,746 ****
  1765. X      "Thief"
  1766. X  };
  1767. X  
  1768. X! static const char *fighter_ranks[] = {
  1769. X      "Stripling",
  1770. X      "Stripling",
  1771. X      "Skirmisher",
  1772. X--- 751,757 ----
  1773. X      "Thief"
  1774. X  };
  1775. X  
  1776. X! static const char NEARDATA *fighter_ranks[] = {
  1777. X      "Stripling",
  1778. X      "Stripling",
  1779. X      "Skirmisher",
  1780. X***************
  1781. X*** 761,767 ****
  1782. X      "Lady"
  1783. X  };
  1784. X  
  1785. X! static const char *tourist_ranks[] = {
  1786. X      "Rambler",
  1787. X      "Rambler",
  1788. X      "Sightseer",
  1789. X--- 772,778 ----
  1790. X      "Lady"
  1791. X  };
  1792. X  
  1793. X! static const char NEARDATA *tourist_ranks[] = {
  1794. X      "Rambler",
  1795. X      "Rambler",
  1796. X      "Sightseer",
  1797. X***************
  1798. X*** 782,788 ****
  1799. X      "Adventurer"
  1800. X  };
  1801. X  
  1802. X! static const char *nomad_ranks[] = {
  1803. X      "Troglodyte",
  1804. X      "Troglodyte",
  1805. X      "Aborigine",
  1806. X--- 793,799 ----
  1807. X      "Adventurer"
  1808. X  };
  1809. X  
  1810. X! static const char NEARDATA *nomad_ranks[] = {
  1811. X      "Troglodyte",
  1812. X      "Troglodyte",
  1813. X      "Aborigine",
  1814. X***************
  1815. X*** 803,809 ****
  1816. X      "Pioneer"
  1817. X  };
  1818. X  
  1819. X! static const char *knight_ranks[] = {
  1820. X      "Gallant",
  1821. X      "Gallant",
  1822. X      "Esquire",
  1823. X--- 814,820 ----
  1824. X      "Pioneer"
  1825. X  };
  1826. X  
  1827. X! static const char NEARDATA *knight_ranks[] = {
  1828. X      "Gallant",
  1829. X      "Gallant",
  1830. X      "Esquire",
  1831. X***************
  1832. X*** 824,830 ****
  1833. X      "Paladin"
  1834. X  };
  1835. X  
  1836. X! static const char *archeo_ranks[] = {
  1837. X      "Digger",
  1838. X      "Digger",
  1839. X      "Field Worker",
  1840. X--- 835,841 ----
  1841. X      "Paladin"
  1842. X  };
  1843. X  
  1844. X! static const char NEARDATA *archeo_ranks[] = {
  1845. X      "Digger",
  1846. X      "Digger",
  1847. X      "Field Worker",
  1848. X***************
  1849. X*** 845,851 ****
  1850. X      "Curator"
  1851. X  };
  1852. X  
  1853. X! static const char *healer_ranks[] = {
  1854. X      "Pre-Med",
  1855. X      "Pre-Med",
  1856. X      "Med Student",
  1857. X--- 856,862 ----
  1858. X      "Curator"
  1859. X  };
  1860. X  
  1861. X! static const char NEARDATA *healer_ranks[] = {
  1862. X      "Pre-Med",
  1863. X      "Pre-Med",
  1864. X      "Med Student",
  1865. X***************
  1866. X*** 866,872 ****
  1867. X      "Chief Surgeon"
  1868. X  };
  1869. X  
  1870. X! static const char *barbarian_ranks[] = {
  1871. X      "Plunderer",
  1872. X      "Plunderess",
  1873. X      "Pillager",
  1874. X--- 877,883 ----
  1875. X      "Chief Surgeon"
  1876. X  };
  1877. X  
  1878. X! static const char NEARDATA *barbarian_ranks[] = {
  1879. X      "Plunderer",
  1880. X      "Plunderess",
  1881. X      "Pillager",
  1882. X***************
  1883. X*** 887,893 ****
  1884. X      "Conqueress"
  1885. X  };
  1886. X  
  1887. X! static const char *ninja_ranks[] = {
  1888. X      "Chigo",
  1889. X      "Chigo",
  1890. X      "Bushi",
  1891. X--- 898,904 ----
  1892. X      "Conqueress"
  1893. X  };
  1894. X  
  1895. X! static const char NEARDATA *ninja_ranks[] = {
  1896. X      "Chigo",
  1897. X      "Chigo",
  1898. X      "Bushi",
  1899. X***************
  1900. X*** 908,914 ****
  1901. X      "Jonin",
  1902. X  };
  1903. X  
  1904. X! static const char *elf_ranks[] = {
  1905. X      "Edhel",
  1906. X      "Elleth",
  1907. X      "Edhel",
  1908. X--- 919,925 ----
  1909. X      "Jonin",
  1910. X  };
  1911. X  
  1912. X! static const char NEARDATA *elf_ranks[] = {
  1913. X      "Edhel",
  1914. X      "Elleth",
  1915. X      "Edhel",
  1916. X***************
  1917. X*** 931,941 ****
  1918. X  
  1919. X  #endif /* OVL1 */
  1920. X  
  1921. X! OSTATIC const char **NDECL(rank_array);
  1922. X  
  1923. X  #ifdef OVL1
  1924. X  
  1925. X! XSTATIC const char **
  1926. X  rank_array() {
  1927. X      register const char **ranks;
  1928. X  
  1929. X--- 942,952 ----
  1930. X  
  1931. X  #endif /* OVL1 */
  1932. X  
  1933. X! STATIC_DCL const char **NDECL(rank_array);
  1934. X  
  1935. X  #ifdef OVL1
  1936. X  
  1937. X! STATIC_OVL const char **
  1938. X  rank_array() {
  1939. X      register const char **ranks;
  1940. X  
  1941. X***************
  1942. X*** 959,969 ****
  1943. X  
  1944. X  #endif /* OVL1 */
  1945. X  
  1946. X! OSTATIC const char *rank();
  1947. X  
  1948. X  #ifdef OVL1
  1949. X  
  1950. X! XSTATIC const char *
  1951. X  rank() {
  1952. X      register int place;
  1953. X      register const char **ranks = rank_array();
  1954. X--- 970,980 ----
  1955. X  
  1956. X  #endif /* OVL1 */
  1957. X  
  1958. X! STATIC_DCL const char *NDECL(rank);
  1959. X  
  1960. X  #ifdef OVL1
  1961. X  
  1962. X! STATIC_OVL const char *
  1963. X  rank() {
  1964. X      register int place;
  1965. X      register const char **ranks = rank_array();
  1966. X***************
  1967. X*** 1261,1267 ****
  1968. X   * user programmable
  1969. X   */
  1970. X  
  1971. X! static const char rndobs[] = {
  1972. X      WEAPON_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM, WAND_SYM,
  1973. X  #ifdef SPELLS
  1974. X      SPBOOK_SYM,
  1975. X--- 1272,1278 ----
  1976. X   * user programmable
  1977. X   */
  1978. X  
  1979. X! static const char NEARDATA rndobs[] = {
  1980. X      WEAPON_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM, WAND_SYM,
  1981. X  #ifdef SPELLS
  1982. X      SPBOOK_SYM,
  1983. X***************
  1984. X*** 1274,1280 ****
  1985. X      return rndobs[rn2(SIZE(rndobs))];
  1986. X  }
  1987. X  
  1988. X! static const char *hcolors[] = {
  1989. X              "ultraviolet", "infrared", "hot pink", "psychedelic",
  1990. X              "bluish-orange", "reddish-green", "dark white",
  1991. X              "light black", "loud", "salty", "sweet", "sour",
  1992. X--- 1285,1291 ----
  1993. X      return rndobs[rn2(SIZE(rndobs))];
  1994. X  }
  1995. X  
  1996. X! static const char NEARDATA *hcolors[] = {
  1997. X              "ultraviolet", "infrared", "hot pink", "psychedelic",
  1998. X              "bluish-orange", "reddish-green", "dark white",
  1999. X              "light black", "loud", "salty", "sweet", "sour",
  2000. X***************
  2001. X*** 1297,1303 ****
  2002. X  #ifdef OVL0
  2003. X  
  2004. X  /*ARGSUSED*/
  2005. X! XSTATIC void
  2006. X  hilite(x, y, let, typ)
  2007. X  int x, y;
  2008. X  uchar let, typ;
  2009. X--- 1308,1314 ----
  2010. X  #ifdef OVL0
  2011. X  
  2012. X  /*ARGSUSED*/
  2013. X! STATIC_OVL void
  2014. X  hilite(x, y, let, typ)
  2015. X  int x, y;
  2016. X  uchar let, typ;
  2017. X***************
  2018. X*** 1446,1452 ****
  2019. X  #ifdef TEXTCOLOR
  2020. X  /* pick an appropriate color for a mimic imitating an object */
  2021. X  
  2022. X! XSTATIC uchar
  2023. X  mimic_color(mtmp)
  2024. X  struct monst *mtmp;
  2025. X  {
  2026. X--- 1457,1463 ----
  2027. X  #ifdef TEXTCOLOR
  2028. X  /* pick an appropriate color for a mimic imitating an object */
  2029. X  
  2030. X! STATIC_OVL uchar
  2031. X  mimic_color(mtmp)
  2032. X  struct monst *mtmp;
  2033. X  {
  2034. X*** src/Old/priest.c    Sun Jun  3 14:06:04 1990
  2035. X--- src/priest.c    Thu May 31 22:13:29 1990
  2036. X***************
  2037. X*** 10,15 ****
  2038. X--- 10,18 ----
  2039. X  #include "eshk.h"
  2040. X  #include "epri.h"
  2041. X  
  2042. X+ #ifdef OVLB
  2043. X+ 
  2044. X+ #if defined(ALTARS) && defined(THEOLOGY)
  2045. X  static boolean FDECL(histemple_at,(struct monst *,int,int));
  2046. X  static int FDECL(t_alignment,(struct mkroom *));
  2047. X  static boolean FDECL(is_shrined,(struct mkroom *));
  2048. X***************
  2049. X*** 16,23 ****
  2050. X  static boolean FDECL(t_coaligned,(struct mkroom *));
  2051. X  struct monst *FDECL(findpriest,(struct mkroom *));
  2052. X  static boolean FDECL(p_inhistemple,(struct mkroom *));
  2053. X! 
  2054. X! #ifdef OVLB
  2055. X  
  2056. X  /* used for the insides of shk_move and pri_move */
  2057. X  int
  2058. X--- 19,25 ----
  2059. X  static boolean FDECL(t_coaligned,(struct mkroom *));
  2060. X  struct monst *FDECL(findpriest,(struct mkroom *));
  2061. X  static boolean FDECL(p_inhistemple,(struct mkroom *));
  2062. X! #endif
  2063. X  
  2064. X  /* used for the insides of shk_move and pri_move */
  2065. X  int
  2066. X***************
  2067. X*** 236,252 ****
  2068. X              cnt--;
  2069. X          }
  2070. X  #endif
  2071. X!         if(p_coaligned(priest)) {
  2072. X              (void) mongets(priest, rn2(2) ? CLOAK_OF_PROTECTION
  2073. X                            : CLOAK_OF_MAGIC_RESISTANCE);
  2074. X! #ifdef NAMED_ITEMS
  2075. X!             otmp = mk_aligned_artifact((unsigned)EPRI(priest)->shralign + 1);
  2076. X!             if(otmp) {
  2077. X!             otmp->spe = rnd(4);
  2078. X!             mpickobj(priest, otmp);
  2079. X!             }
  2080. X! #endif
  2081. X!         } else {
  2082. X              if(!rn2(5)) 
  2083. X              otmp = mksobj(CLOAK_OF_MAGIC_RESISTANCE, FALSE); 
  2084. X              else otmp = mksobj(CLOAK_OF_PROTECTION, FALSE); 
  2085. X--- 238,247 ----
  2086. X              cnt--;
  2087. X          }
  2088. X  #endif
  2089. X!         if(p_coaligned(priest))
  2090. X              (void) mongets(priest, rn2(2) ? CLOAK_OF_PROTECTION
  2091. X                            : CLOAK_OF_MAGIC_RESISTANCE);
  2092. X!         else {
  2093. X              if(!rn2(5)) 
  2094. X              otmp = mksobj(CLOAK_OF_MAGIC_RESISTANCE, FALSE); 
  2095. X              else otmp = mksobj(CLOAK_OF_PROTECTION, FALSE); 
  2096. X***************
  2097. X*** 254,265 ****
  2098. X              if(!rn2(2)) curse(otmp);
  2099. X              mpickobj(priest, otmp);
  2100. X              }
  2101. X!             otmp = mksobj(MACE, FALSE);
  2102. X!             if(otmp) {
  2103. X!             otmp->spe = rnd(3);
  2104. X!             if(!rn2(2)) curse(otmp);
  2105. X!             mpickobj(priest, otmp);
  2106. X!             }
  2107. X          }
  2108. X      }
  2109. X  }
  2110. X--- 249,261 ----
  2111. X              if(!rn2(2)) curse(otmp);
  2112. X              mpickobj(priest, otmp);
  2113. X              }
  2114. X!         }
  2115. X! 
  2116. X!         otmp = mksobj(MACE, FALSE);
  2117. X!         if(otmp) {
  2118. X!             otmp->spe = rnd(3);
  2119. X!             if(!rn2(2)) curse(otmp);
  2120. X!             mpickobj(priest, otmp);
  2121. X          }
  2122. X      }
  2123. X  }
  2124. X***************
  2125. X*** 268,274 ****
  2126. X  priestname(priest)
  2127. X  register struct monst *priest;
  2128. X  {
  2129. X!     static char pname[PL_NSIZ];
  2130. X  
  2131. X      Strcpy(pname, "the ");
  2132. X      if(priest->minvis) Strcat(pname, "invisible ");
  2133. X--- 264,270 ----
  2134. X  priestname(priest)
  2135. X  register struct monst *priest;
  2136. X  {
  2137. X!     static char NEARDATA pname[PL_NSIZ];
  2138. X  
  2139. X      Strcpy(pname, "the ");
  2140. X      if(priest->minvis) Strcat(pname, "invisible ");
  2141. X***************
  2142. X*** 447,452 ****
  2143. X--- 443,449 ----
  2144. X              kludge("%s gives you two bits for an ale.", Monnam(priest));
  2145. X              u.ugold = 2L;
  2146. X          if (priest->mgold) priest->mgold -= 2L;
  2147. X+         flags.botl = 1;
  2148. X          } else
  2149. X          kludge("%s is not interested.", Monnam(priest));
  2150. X          return;
  2151. X
  2152. END_OF_FILE
  2153. if test 51445 -ne `wc -c <'patch8.06'`; then
  2154.     echo shar: \"'patch8.06'\" unpacked with wrong size!
  2155. fi
  2156. # end of 'patch8.06'
  2157. fi
  2158. if test -f 'vms/oldcrtl.c' -a "${1}" != "-c" ; then 
  2159.   echo shar: Will not clobber existing file \"'vms/oldcrtl.c'\"
  2160. else
  2161. echo shar: Extracting \"'vms/oldcrtl.c'\" \(5259 characters\)
  2162. sed "s/^X//" >'vms/oldcrtl.c' <<'END_OF_FILE'
  2163. X/*       SCCS Id: @(#)oldcrtl.c   3.0      90/05/24
  2164. X/*        Pat Rankin  May'90                                       */
  2165. X/* VMS NetHack support, not needed for vms 4.6,4.7,or 5.x.        */
  2166. X
  2167. X#ifdef VERYOLD_VMS
  2168. X/*
  2169. X * The following routines are used by NetHack but were not available
  2170. X * from the C Run-Time Library (VAXCRTL) prior to VMS V4.6.
  2171. X *
  2172. X *      atexit, memcmp, memcpy, qsort, rename, vprintf, vsprintf
  2173. X *
  2174. X * Most of them are implemented here, but others will have to be worked
  2175. X * around in another fashion [such as '#define USE_OLDARGS' (even though
  2176. X * <varargs.h> is available) to avoid the need for vprintf & vsprintf].
  2177. X *
  2178. X */
  2179. X#define REG register
  2180. X
  2181. X#ifndef SUPPRESS_MEM_FUNCS
  2182. X/* note: hand optimized for VAX (hardware pre-decrement & post-increment) */
  2183. X
  2184. X/* void *memset(void *, int, size_t) -- fill chunk of memory.
  2185. X*/
  2186. Xchar *memset( dst, fil, cnt )
  2187. XREG char *dst;
  2188. XREG char  fil;
  2189. XREG int   cnt;
  2190. X{
  2191. X    char *dst_p = dst;
  2192. X    while ( --cnt >= 0 )
  2193. X    *dst++ = fil;
  2194. X    return dst_p;
  2195. X}
  2196. X
  2197. X/* void *memcpy(void *, const void *, size_t) -- copy chunk of memory.
  2198. X*/
  2199. Xchar *memcpy( dst, src, cnt )       /*[functionally equivalent to memmove()]*/
  2200. XREG char *dst;
  2201. XREG char *src;
  2202. XREG int   cnt;
  2203. X{
  2204. X    char *dst_p = dst;
  2205. X    if ( src == dst || cnt <= 0 ) {
  2206. X    ;       /* do nothing */
  2207. X    } else if ( dst < src || dst >= src + cnt ) {
  2208. X    while ( --cnt >= 0 )
  2209. X        *dst++ = *src++;
  2210. X    } else {    /* work backwards */
  2211. X    dst += cnt,  src += cnt;
  2212. X    while ( --cnt >= 0 )
  2213. X        *--dst = *--src;
  2214. X    }
  2215. X    return dst_p;
  2216. X}
  2217. X
  2218. X/* void *memchr(const void *, int, size_t) -- search for a byte.
  2219. X*/
  2220. Xchar *memchr( buf, byt, len )
  2221. XREG char *buf;
  2222. XREG char  byt;
  2223. XREG int   len;
  2224. X{
  2225. X    while ( --len >= 0 )
  2226. X    if ( *buf++ == byt )    /* found */
  2227. X        return --buf;
  2228. X    return (char *)0;       /* not found */
  2229. X}
  2230. X
  2231. X/* int memcmp(const void *, const void *, size_t) -- compare two chunks.
  2232. X*/
  2233. Xint memcmp( buf1, buf2, len )
  2234. XREG char *buf1;
  2235. XREG char *buf2;
  2236. XREG int   len;
  2237. X{
  2238. X    while ( --len >= 0 )
  2239. X    if ( *buf1++ != *buf2++ )
  2240. X        return (*--buf1 - *--buf2);
  2241. X    return 0;   /* buffers matched */
  2242. X}
  2243. X#endif /*!SUPPRESS_MEM_FUNCS*/
  2244. X
  2245. X
  2246. X#ifndef SUPPRESS_ATEXIT
  2247. X/* int atexit(void (*)(void)) -- register an exit handler.
  2248. X*/
  2249. X#define MAX_EXIT_FUNCS 32       /* arbitrary (32 matches VAX C v3.x docs) */
  2250. Xstruct _ex_hndlr { long reserved, (*routine)(), arg_count, *arg1_addr; };
  2251. Xstatic int ex_cnt = 0;          /* number of handlers registered so far */
  2252. Xstatic struct { long dummy_arg; struct _ex_hndlr handler;   /*(black box)*/
  2253. X       } ex_data[MAX_EXIT_FUNCS];       /* static handler data */
  2254. X
  2255. Xint atexit( function )
  2256. X    int (*function)();          /* note: actually gets called with 1 arg */
  2257. X{
  2258. X    if ( ex_cnt < MAX_EXIT_FUNCS ) {
  2259. X    ex_data[ex_cnt].dummy_arg = 0;  /* ultimately receives exit reason */
  2260. X    ex_data[ex_cnt].handler.reserved  = 0;
  2261. X    ex_data[ex_cnt].handler.routine   = function;
  2262. X    ex_data[ex_cnt].handler.arg_count = 1;          /*(required)*/
  2263. X    ex_data[ex_cnt].handler.arg1_addr = &ex_data[ex_cnt].dummy_arg;
  2264. X    SYS$DCLEXH( &ex_data[ex_cnt].handler);  /* declare exit handler */
  2265. X    return ++ex_cnt;        /*(non-zero)*/
  2266. X    } else
  2267. X    return 0;
  2268. X}
  2269. X#endif /*!SUPPRESS_ATEXIT*/
  2270. X
  2271. X
  2272. X#ifndef SUPPRESS_RENAME
  2273. X/* int rename(const char *, const char *) -- rename a file (on same device).
  2274. X*/
  2275. X#ifndef EVMSERR
  2276. X#include <errno.h>
  2277. X#define C$$TRANSLATE(status)    (errno = EVMSERR,  vaxc$errno = (status))
  2278. X#endif
  2279. X
  2280. Xint rename( old_name, new_name )
  2281. X    char *old_name;
  2282. X    char *new_name;
  2283. X{
  2284. X    struct _dsc { int len; char *adr; } old_dsc, new_dsc;
  2285. X    unsigned long status, LIB$RENAME_FILE();
  2286. X
  2287. X    /* put strings into descriptors and call run-time library routine */
  2288. X    old_dsc.len = strlen( old_dsc.adr = old_name );
  2289. X    new_dsc.len = strlen( new_dsc.adr = new_name );
  2290. X    status = LIB$RENAME_FILE( &old_dsc, &new_dsc);  /* omit optional args */
  2291. X    if ( !(status & 1) ) {      /* even => failure */
  2292. X    C$$TRANSLATE(status);
  2293. X    return -1;
  2294. X    } else                      /*  odd => success */
  2295. X    return 0;
  2296. X}
  2297. X#endif /*!SUPPRESS_RENAME*/
  2298. X
  2299. X
  2300. X#ifndef SUPPRESS_QSORT
  2301. X/* void qsort(void *, size_t, size_t, int (*)()) -- sort arbitrary collection.
  2302. X*/
  2303. Xvoid qsort( base, count, size, compare )
  2304. X    char *base;
  2305. X    int   count;
  2306. XREG int   size;
  2307. X    int (*compare)();
  2308. X{
  2309. XREG int   i, cmp;
  2310. XREG char *next, *prev, *tmp = 0;
  2311. X    char  wrk_buf[512], *malloc();      /* assume no alloca() available */
  2312. X
  2313. X    /* just use a shuffle sort (tradeoff between efficiency & simplicity) */
  2314. X    /*  [Optimal if already sorted; worst case when initially reversed.]  */
  2315. X    for ( next = base, i = 1;  i < count;  i++ ) {
  2316. X    prev = next,  next += size;             /* increment front pointer */
  2317. X    if ( (cmp = (*compare)( next, prev)) < 0 ) {
  2318. X        /* found element out of order; move other(s) up then re-insert it */
  2319. X        if ( !tmp )  tmp = (size > sizeof wrk_buf ? malloc(size) : wrk_buf);
  2320. X        memcpy( tmp, next, size);           /* save smaller element */
  2321. X        while ( cmp < 0 ) {
  2322. X        memcpy( prev + size, prev, size);   /* move larger elem. up */
  2323. X        prev -= size;                   /* decrement back pointer */
  2324. X        cmp = (prev >= base ? (*compare)( tmp, prev) : 0);
  2325. X        }
  2326. X        memcpy( prev + size, tmp, size);    /* restore small element */
  2327. X    }
  2328. X    }
  2329. X    if ( tmp != 0 && tmp != wrk_buf )  free(tmp);
  2330. X    return;
  2331. X}
  2332. X#endif /*!SUPPRESS_QSORT*/
  2333. X
  2334. X#endif /*VERYOLD_VMS*/
  2335. END_OF_FILE
  2336. if test 5259 -ne `wc -c <'vms/oldcrtl.c'`; then
  2337.     echo shar: \"'vms/oldcrtl.c'\" unpacked with wrong size!
  2338. fi
  2339. # end of 'vms/oldcrtl.c'
  2340. fi
  2341. echo shar: End of archive 7 \(of 24\).
  2342. cp /dev/null ark7isdone
  2343. MISSING=""
  2344. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ; do
  2345.     if test ! -f ark${I}isdone ; then
  2346.     MISSING="${MISSING} ${I}"
  2347.     fi
  2348. done
  2349. if test "${MISSING}" = "" ; then
  2350.     echo You have unpacked all 24 archives.
  2351.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2352. else
  2353.     echo You still need to unpack the following archives:
  2354.     echo "        " ${MISSING}
  2355. fi
  2356. ##  End of shell archive.
  2357. exit 0
  2358.